package com.xm;

/**
 * @author xiaoming
 * @date 2021-02-10 21:54
 */
public class ThreadNameTest {
    public static void main(String[] args) {
        Thread t = new Thread("测试任务");

        // 继承 Thread 设置线程名称
        SyncNoticeDataThread syncThread = new SyncNoticeDataThread();
        syncThread.start();

        // 测试线程组
        ThreadGroup syncGroup = new ThreadGroup("SyncMainThreadGroup");

        SyncNoticeDataThread t2 = new SyncNoticeDataThread(syncGroup);
        t2.start();
    }
}



